<html>
<head><meta charset="utf-8"><title>About `CFG_COMPILER_HOST_TRIPLE` · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html">About `CFG_COMPILER_HOST_TRIPLE`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244520510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244520510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ahbkc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244520510">(Jul 01 2021 at 05:31)</a>:</h4>
<p>Why can the value of the environment variable <code>CFG_COMPILER_HOST_TRIPLE</code> be directly retrieved from the system environment variable? When was the variable value configured?</p>



<a name="244524778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244524778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244524778">(Jul 01 2021 at 06:43)</a>:</h4>
<p><span class="user-mention" data-user-id="418203">@ahbkc</span> It is set at <a href="https://github.com/rust-lang/rust/blob/1ea0e283b4949a9a600824813f8b934d6d7c4cf5/src/bootstrap/builder.rs#L1434">https://github.com/rust-lang/rust/blob/1ea0e283b4949a9a600824813f8b934d6d7c4cf5/src/bootstrap/builder.rs#L1434</a></p>



<a name="244525439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244525439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ahbkc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244525439">(Jul 01 2021 at 06:52)</a>:</h4>
<p>I found it here, but I don’t understand how the rustc process gets the value of the <code>CFG_COMPILER_HOST_TRIPLE</code> variable at runtime.</p>



<a name="244526367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244526367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244526367">(Jul 01 2021 at 07:04)</a>:</h4>
<p>The env!() macro reads an env var at build time, not runtime.</p>



<a name="244526895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244526895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ahbkc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244526895">(Jul 01 2021 at 07:11)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span>  Thanks, I will look at the code again</p>



<a name="244534082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244534082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ahbkc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244534082">(Jul 01 2021 at 08:33)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> Thanks, i figured it out</p>



<a name="244558819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244558819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244558819">(Jul 01 2021 at 12:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/1ea0e283b4949a9a600824813f8b934d6d7c4cf5/src/bootstrap/builder.rs#L1427">https://github.com/rust-lang/rust/blob/1ea0e283b4949a9a600824813f8b934d6d7c4cf5/src/bootstrap/builder.rs#L1427</a><br>
Hmm, cargo does have space support if you use -Zconfig. Would be nice to fix that.</p>



<a name="244594622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244594622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244594622">(Jul 01 2021 at 16:40)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> Wrong topic?</p>



<a name="244595422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/About%20%60CFG_COMPILER_HOST_TRIPLE%60/near/244595422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/About.20.60CFG_COMPILER_HOST_TRIPLE.60.html#244595422">(Jul 01 2021 at 16:47)</a>:</h4>
<p>I guess I could have made a new one - I found that line from the link you posted</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>